/**
* Unicorn Princess iteration 1 remix
* Cleaning up the code, a bit over a year later :(
*
* @date 2011-04-08
* @author Rachel J. Morris
*
* http://www.moosader.com/
* http://code.google.com/p/unicorn-princess/
* GNU GPL v3 license
*/

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

// Updated files
#include "engine/GameSys.hpp"
#include "engine/GraphicAsset.hpp"
#include "engine/ManagerTemplate.hpp"
#include "engine/AssetListParser.hpp"

int main( int argc, char *args[] )
{
    GameSys gameSys;

    AssetListParser assetList;
    assetList.GenerateLists();
    ManagerTemplate<GraphicAsset> graphicsManager;
    graphicsManager.LoadAssets( assetList.GetGraphicAssetPath(), assetList.GetGraphicAssetList() );

    sleep(0.1);

    // Temporary image test
    sf::Sprite tempBackground;
    tempBackground.SetImage( graphicsManager.GetAsset( "bg_00" ).image );
    tempBackground.SetPosition( 0, 0 );

    sf::Sprite tempCharacter;
    tempCharacter.SetImage( graphicsManager.GetAsset( "enemy_00" ).image );
    tempCharacter.SetPosition( 320, 240 );

    gameSys.AddToRenderList( tempBackground );
    gameSys.AddToRenderList( tempCharacter );
    gameSys.DrawScreen();
    sleep(1);
    tempCharacter.SetPosition( 240, 320 );
    gameSys.AddToRenderList( tempBackground );
    gameSys.AddToRenderList( tempCharacter );
    gameSys.DrawScreen();

    sleep(2);
    return 0;
}
